import { createApp } from 'vue'
import App from './App.vue'
import router from "./util/router.js";
import ElementPlus from 'element-plus';
import 'element-plus/theme-chalk/index.css';
import locale from "element-plus/es/locale/lang/zh-cn";
import axios from './axios/http';
import VueAxios from "vue-axios";
import { createPinia } from 'pinia'
import Pagination from '@/components/Pagination/index.vue'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'; // 引入 Element Plus 图标库

const app = createApp(App);

// 注册 Element Plus 图标库
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component);
}

app.use(createPinia())
    .use(router)
    .use(ElementPlus, { locale })
    .use(VueAxios, axios)
    .component('Pagination', Pagination)
    .mount('#app')
